﻿#include <stdio.h>
double aver(double array[5]);
double allaver(double array[3][5]);
double max_(double* a, double* b);

int main(void)
{
    double arr[3][5];
    double sum = 0;

    for (int i = 0; i < 3; i++) {
        printf("Enter 5 number:");
        for (int j = 0; j < 5; j++)
            scanf("%lf", &arr[i][j]);
    }
    for (int m = 0; m < 3; m++) {
        printf("%.2lf ", aver(arr[m]));
    }
    printf("\n");
    printf("%.2lf\n", allaver(arr));
    printf("%.2lf\n", max_(*arr, *arr + 15));
    return 0;
}
double aver(double array[5])
{
    double sum = 0;
    for (int i = 0; i < 5; i++) {
        sum += array[i];
    }
    return sum / 5;
}
double allaver(double array[3][5])
{
    double sum = 0;
    for (int i = 0; i < 3; i++) {
        sum += aver(array[i]);
    }
    return sum / 3;
}
double max_(double* a, double* b)
{
    double max = 0;
    for (; a < b; a++)
        max = max > * a ? max : *a;
    return max;
}
